Integrand size = 23, antiderivative size = 115 \[ \int \frac {\cot ^5(e+f x)}{a+b \tan ^2(e+f x)} \, dx=\frac {(a+b) \cot ^2(e+f x)}{2 a^2 f}-\frac {\cot ^4(e+f x)}{4 a f}+\frac {\log (\cos (e+f x))}{(a-b) f}+\frac {\left (a^2+a b+b^2\right ) \log (\tan (e+f x))}{a^3 f}+\frac {b^3 \log \left (a+b \tan ^2(e+f x)\right )}{2 a^3 (a-b) f} \]
1/2*(a+b)*cot(f*x+e)^2/a^2/f-1/4*cot(f*x+e)^4/a/f+ln(cos(f*x+e))/(a-b)/f+( a^2+a*b+b^2)*ln(tan(f*x+e))/a^3/f+1/2*b^3*ln(a+b*tan(f*x+e)^2)/a^3/(a-b)/f
Time = 0.41 (sec) , antiderivative size = 83, normalized size of antiderivative = 0.72 \[ \int \frac {\cot ^5(e+f x)}{a+b \tan ^2(e+f x)} \, dx=-\frac {-\frac {(a+b) \cot ^2(e+f x)}{a^2}+\frac {\cot ^4(e+f x)}{2 a}-\frac {b^3 \log \left (b+a \cot ^2(e+f x)\right )}{a^3 (a-b)}-\frac {2 \log (\sin (e+f x))}{a-b}}{2 f} \]
-1/2*(-(((a + b)*Cot[e + f*x]^2)/a^2) + Cot[e + f*x]^4/(2*a) - (b^3*Log[b + a*Cot[e + f*x]^2])/(a^3*(a - b)) - (2*Log[Sin[e + f*x]])/(a - b))/f
Time = 0.33 (sec) , antiderivative size = 106, normalized size of antiderivative = 0.92, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3042, 4153, 354, 93, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cot ^5(e+f x)}{a+b \tan ^2(e+f x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\tan (e+f x)^5 \left (a+b \tan (e+f x)^2\right )}dx\) |
\(\Big \downarrow \) 4153 |
\(\displaystyle \frac {\int \frac {\cot ^5(e+f x)}{\left (\tan ^2(e+f x)+1\right ) \left (b \tan ^2(e+f x)+a\right )}d\tan (e+f x)}{f}\) |
\(\Big \downarrow \) 354 |
\(\displaystyle \frac {\int \frac {\cot ^3(e+f x)}{\left (\tan ^2(e+f x)+1\right ) \left (b \tan ^2(e+f x)+a\right )}d\tan ^2(e+f x)}{2 f}\) |
\(\Big \downarrow \) 93 |
\(\displaystyle \frac {\int \left (\frac {b^4}{a^3 (a-b) \left (b \tan ^2(e+f x)+a\right )}+\frac {\cot ^3(e+f x)}{a}+\frac {(-a-b) \cot ^2(e+f x)}{a^2}+\frac {\left (a^2+b a+b^2\right ) \cot (e+f x)}{a^3}-\frac {1}{(a-b) \left (\tan ^2(e+f x)+1\right )}\right )d\tan ^2(e+f x)}{2 f}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\frac {b^3 \log \left (a+b \tan ^2(e+f x)\right )}{a^3 (a-b)}+\frac {(a+b) \cot (e+f x)}{a^2}+\frac {\left (a^2+a b+b^2\right ) \log \left (\tan ^2(e+f x)\right )}{a^3}-\frac {\log \left (\tan ^2(e+f x)+1\right )}{a-b}-\frac {\cot ^2(e+f x)}{2 a}}{2 f}\) |
(((a + b)*Cot[e + f*x])/a^2 - Cot[e + f*x]^2/(2*a) + ((a^2 + a*b + b^2)*Lo g[Tan[e + f*x]^2])/a^3 - Log[1 + Tan[e + f*x]^2]/(a - b) + (b^3*Log[a + b* Tan[e + f*x]^2])/(a^3*(a - b)))/(2*f)
3.3.16.3.1 Defintions of rubi rules used
Int[((e_.) + (f_.)*(x_))^(p_)/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_] :> Int[ExpandIntegrand[(e + f*x)^p/((a + b*x)*(c + d*x)), x], x] /; Fre eQ[{a, b, c, d, e, f}, x] && IntegerQ[p]
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(q_.), x_S ymbol] :> Simp[1/2 Subst[Int[x^((m - 1)/2)*(a + b*x)^p*(c + d*x)^q, x], x , x^2], x] /; FreeQ[{a, b, c, d, p, q}, x] && NeQ[b*c - a*d, 0] && IntegerQ [(m - 1)/2]
Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[c*(ff/f) Subst[Int[(d*ff*(x/c))^m*((a + b*(ff*x)^n)^p/(c^2 + f f^2*x^2)), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && (IGtQ[p, 0] || EqQ[n, 2] || EqQ[n, 4] || (IntegerQ[p] && Ratio nalQ[n]))
Time = 0.22 (sec) , antiderivative size = 101, normalized size of antiderivative = 0.88
method | result | size |
parallelrisch | \(\frac {2 \ln \left (a +b \tan \left (f x +e \right )^{2}\right ) b^{3}-2 \ln \left (\sec \left (f x +e \right )^{2}\right ) a^{3}+\left (4 a^{3}-4 b^{3}\right ) \ln \left (\tan \left (f x +e \right )\right )-a \cot \left (f x +e \right )^{2} \left (a -b \right ) \left (\cot \left (f x +e \right )^{2} a -2 a -2 b \right )}{4 \left (a -b \right ) a^{3} f}\) | \(101\) |
derivativedivides | \(\frac {\frac {b^{3} \ln \left (a +b \tan \left (f x +e \right )^{2}\right )}{2 a^{3} \left (a -b \right )}-\frac {\ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 \left (a -b \right )}-\frac {1}{4 a \tan \left (f x +e \right )^{4}}-\frac {-a -b}{2 a^{2} \tan \left (f x +e \right )^{2}}+\frac {\left (a^{2}+a b +b^{2}\right ) \ln \left (\tan \left (f x +e \right )\right )}{a^{3}}}{f}\) | \(108\) |
default | \(\frac {\frac {b^{3} \ln \left (a +b \tan \left (f x +e \right )^{2}\right )}{2 a^{3} \left (a -b \right )}-\frac {\ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 \left (a -b \right )}-\frac {1}{4 a \tan \left (f x +e \right )^{4}}-\frac {-a -b}{2 a^{2} \tan \left (f x +e \right )^{2}}+\frac {\left (a^{2}+a b +b^{2}\right ) \ln \left (\tan \left (f x +e \right )\right )}{a^{3}}}{f}\) | \(108\) |
norman | \(\frac {-\frac {1}{4 a f}+\frac {\left (a +b \right ) \tan \left (f x +e \right )^{2}}{2 a^{2} f}}{\tan \left (f x +e \right )^{4}}+\frac {\left (a^{2}+a b +b^{2}\right ) \ln \left (\tan \left (f x +e \right )\right )}{a^{3} f}-\frac {\ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 f \left (a -b \right )}+\frac {b^{3} \ln \left (a +b \tan \left (f x +e \right )^{2}\right )}{2 a^{3} \left (a -b \right ) f}\) | \(117\) |
risch | \(\frac {i x}{a -b}-\frac {2 i x}{a}-\frac {2 i e}{a f}-\frac {2 i b x}{a^{2}}-\frac {2 i b e}{a^{2} f}-\frac {2 i b^{2} x}{a^{3}}-\frac {2 i b^{2} e}{a^{3} f}-\frac {2 i b^{3} x}{\left (a -b \right ) a^{3}}-\frac {2 i b^{3} e}{\left (a -b \right ) a^{3} f}-\frac {2 \left (2 a \,{\mathrm e}^{6 i \left (f x +e \right )}+b \,{\mathrm e}^{6 i \left (f x +e \right )}-2 a \,{\mathrm e}^{4 i \left (f x +e \right )}-2 b \,{\mathrm e}^{4 i \left (f x +e \right )}+2 a \,{\mathrm e}^{2 i \left (f x +e \right )}+b \,{\mathrm e}^{2 i \left (f x +e \right )}\right )}{f \,a^{2} \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )^{4}}+\frac {\ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )}{a f}+\frac {\ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right ) b}{a^{2} f}+\frac {\ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right ) b^{2}}{a^{3} f}+\frac {b^{3} \ln \left ({\mathrm e}^{4 i \left (f x +e \right )}+\frac {2 \left (a +b \right ) {\mathrm e}^{2 i \left (f x +e \right )}}{a -b}+1\right )}{2 \left (a -b \right ) a^{3} f}\) | \(313\) |
1/4*(2*ln(a+b*tan(f*x+e)^2)*b^3-2*ln(sec(f*x+e)^2)*a^3+(4*a^3-4*b^3)*ln(ta n(f*x+e))-a*cot(f*x+e)^2*(a-b)*(cot(f*x+e)^2*a-2*a-2*b))/(a-b)/a^3/f
Time = 0.31 (sec) , antiderivative size = 163, normalized size of antiderivative = 1.42 \[ \int \frac {\cot ^5(e+f x)}{a+b \tan ^2(e+f x)} \, dx=\frac {2 \, b^{3} \log \left (\frac {b \tan \left (f x + e\right )^{2} + a}{\tan \left (f x + e\right )^{2} + 1}\right ) \tan \left (f x + e\right )^{4} + 2 \, {\left (a^{3} - b^{3}\right )} \log \left (\frac {\tan \left (f x + e\right )^{2}}{\tan \left (f x + e\right )^{2} + 1}\right ) \tan \left (f x + e\right )^{4} + {\left (3 \, a^{3} - a^{2} b - 2 \, a b^{2}\right )} \tan \left (f x + e\right )^{4} - a^{3} + a^{2} b + 2 \, {\left (a^{3} - a b^{2}\right )} \tan \left (f x + e\right )^{2}}{4 \, {\left (a^{4} - a^{3} b\right )} f \tan \left (f x + e\right )^{4}} \]
1/4*(2*b^3*log((b*tan(f*x + e)^2 + a)/(tan(f*x + e)^2 + 1))*tan(f*x + e)^4 + 2*(a^3 - b^3)*log(tan(f*x + e)^2/(tan(f*x + e)^2 + 1))*tan(f*x + e)^4 + (3*a^3 - a^2*b - 2*a*b^2)*tan(f*x + e)^4 - a^3 + a^2*b + 2*(a^3 - a*b^2)* tan(f*x + e)^2)/((a^4 - a^3*b)*f*tan(f*x + e)^4)
Leaf count of result is larger than twice the leaf count of optimal. 898 vs. \(2 (97) = 194\).
Time = 46.58 (sec) , antiderivative size = 898, normalized size of antiderivative = 7.81 \[ \int \frac {\cot ^5(e+f x)}{a+b \tan ^2(e+f x)} \, dx=\text {Too large to display} \]
Piecewise((zoo*x, Eq(a, 0) & Eq(b, 0) & Eq(e, 0) & Eq(f, 0)), ((-log(tan(e + f*x)**2 + 1)/(2*f) + log(tan(e + f*x))/f + 1/(2*f*tan(e + f*x)**2) - 1/ (4*f*tan(e + f*x)**4))/a, Eq(b, 0)), ((log(tan(e + f*x)**2 + 1)/(2*f) - lo g(tan(e + f*x))/f - 1/(2*f*tan(e + f*x)**2) + 1/(4*f*tan(e + f*x)**4) - 1/ (6*f*tan(e + f*x)**6))/b, Eq(a, 0)), (-6*log(tan(e + f*x)**2 + 1)*tan(e + f*x)**6/(4*a*f*tan(e + f*x)**6 + 4*a*f*tan(e + f*x)**4) - 6*log(tan(e + f* x)**2 + 1)*tan(e + f*x)**4/(4*a*f*tan(e + f*x)**6 + 4*a*f*tan(e + f*x)**4) + 12*log(tan(e + f*x))*tan(e + f*x)**6/(4*a*f*tan(e + f*x)**6 + 4*a*f*tan (e + f*x)**4) + 12*log(tan(e + f*x))*tan(e + f*x)**4/(4*a*f*tan(e + f*x)** 6 + 4*a*f*tan(e + f*x)**4) + 6*tan(e + f*x)**4/(4*a*f*tan(e + f*x)**6 + 4* a*f*tan(e + f*x)**4) + 3*tan(e + f*x)**2/(4*a*f*tan(e + f*x)**6 + 4*a*f*ta n(e + f*x)**4) - 1/(4*a*f*tan(e + f*x)**6 + 4*a*f*tan(e + f*x)**4), Eq(a, b)), (zoo*x/a, Eq(e, -f*x)), (x*cot(e)**5/(a + b*tan(e)**2), Eq(f, 0)), (- 2*a**3*log(tan(e + f*x)**2 + 1)*tan(e + f*x)**4/(4*a**4*f*tan(e + f*x)**4 - 4*a**3*b*f*tan(e + f*x)**4) + 4*a**3*log(tan(e + f*x))*tan(e + f*x)**4/( 4*a**4*f*tan(e + f*x)**4 - 4*a**3*b*f*tan(e + f*x)**4) + 2*a**3*tan(e + f* x)**2/(4*a**4*f*tan(e + f*x)**4 - 4*a**3*b*f*tan(e + f*x)**4) - a**3/(4*a* *4*f*tan(e + f*x)**4 - 4*a**3*b*f*tan(e + f*x)**4) + a**2*b/(4*a**4*f*tan( e + f*x)**4 - 4*a**3*b*f*tan(e + f*x)**4) - 2*a*b**2*tan(e + f*x)**2/(4*a* *4*f*tan(e + f*x)**4 - 4*a**3*b*f*tan(e + f*x)**4) + 2*b**3*log(-sqrt(-...
Time = 0.27 (sec) , antiderivative size = 96, normalized size of antiderivative = 0.83 \[ \int \frac {\cot ^5(e+f x)}{a+b \tan ^2(e+f x)} \, dx=\frac {\frac {2 \, b^{3} \log \left (-{\left (a - b\right )} \sin \left (f x + e\right )^{2} + a\right )}{a^{4} - a^{3} b} + \frac {2 \, {\left (a^{2} + a b + b^{2}\right )} \log \left (\sin \left (f x + e\right )^{2}\right )}{a^{3}} + \frac {2 \, {\left (2 \, a + b\right )} \sin \left (f x + e\right )^{2} - a}{a^{2} \sin \left (f x + e\right )^{4}}}{4 \, f} \]
1/4*(2*b^3*log(-(a - b)*sin(f*x + e)^2 + a)/(a^4 - a^3*b) + 2*(a^2 + a*b + b^2)*log(sin(f*x + e)^2)/a^3 + (2*(2*a + b)*sin(f*x + e)^2 - a)/(a^2*sin( f*x + e)^4))/f
Leaf count of result is larger than twice the leaf count of optimal. 380 vs. \(2 (109) = 218\).
Time = 0.96 (sec) , antiderivative size = 380, normalized size of antiderivative = 3.30 \[ \int \frac {\cot ^5(e+f x)}{a+b \tan ^2(e+f x)} \, dx=\frac {\frac {32 \, b^{3} \log \left (a + \frac {2 \, a {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} - \frac {4 \, b {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {a {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )}{a^{4} - a^{3} b} - \frac {64 \, \log \left ({\left | -\frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 1 \right |}\right )}{a - b} - \frac {\frac {12 \, a {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {8 \, b {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {a {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}}{a^{2}} + \frac {32 \, {\left (a^{2} + a b + b^{2}\right )} \log \left (\frac {{\left | -\cos \left (f x + e\right ) + 1 \right |}}{{\left | \cos \left (f x + e\right ) + 1 \right |}}\right )}{a^{3}} - \frac {{\left (a^{2} + \frac {12 \, a^{2} {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {8 \, a b {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {48 \, a^{2} {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {48 \, a b {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {48 \, b^{2} {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (f x + e\right ) + 1\right )}^{2}}{a^{3} {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}}{64 \, f} \]
1/64*(32*b^3*log(a + 2*a*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) - 4*b*(cos( f*x + e) - 1)/(cos(f*x + e) + 1) + a*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2)/(a^4 - a^3*b) - 64*log(abs(-(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + 1))/(a - b) - (12*a*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + 8*b*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + a*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2) /a^2 + 32*(a^2 + a*b + b^2)*log(abs(-cos(f*x + e) + 1)/abs(cos(f*x + e) + 1))/a^3 - (a^2 + 12*a^2*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + 8*a*b*(cos (f*x + e) - 1)/(cos(f*x + e) + 1) + 48*a^2*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 + 48*a*b*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 + 48*b^2*(co s(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2)*(cos(f*x + e) + 1)^2/(a^3*(cos(f*x + e) - 1)^2))/f
Time = 10.84 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.03 \[ \int \frac {\cot ^5(e+f x)}{a+b \tan ^2(e+f x)} \, dx=\frac {\ln \left (\mathrm {tan}\left (e+f\,x\right )\right )\,\left (a^2+a\,b+b^2\right )}{a^3\,f}-\frac {\ln \left ({\mathrm {tan}\left (e+f\,x\right )}^2+1\right )}{2\,f\,\left (a-b\right )}-\frac {b^3\,\ln \left (b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a\right )}{f\,\left (2\,a^3\,b-2\,a^4\right )}-\frac {{\mathrm {cot}\left (e+f\,x\right )}^4\,\left (\frac {1}{4\,a}-\frac {{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (a+b\right )}{2\,a^2}\right )}{f} \]